package j01string;

public class J3 {
    public static void main(String[] args) {
        System.out.println("  a  b   c   ");
        System.out.println("  a  b   c   ".trim());
        System.out.println("        ".trim());
        System.out.println(1);
        System.out.println("1");

        System.out.println(1+3);
        System.out.println("1"+3);
        System.out.println("==");
        System.out.println(String.valueOf(3));
        System.out.println(3+"");
    }
}

class Cat{
    String name;

    public Cat(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
//        return "加菲猫";
        return name;
    }
}
class CatTest{
    public static void main(String[] args) {
//        Cat c1 = new Cat();
//        //c1.toString()
//        System.out.println(c1);
//        System.out.println(String.valueOf(c1));
//
//        System.out.println(c1.toString());

        System.out.println(new Cat("波斯猫"));
        System.out.println(new Cat("加菲猫"));
    }
}
